package coml.dzsw.base.number;

import java.math.BigDecimal;
import java.math.RoundingMode;

public class BigDecimalSample {

    public static void main(String[] args) {
        System.out.println("UP >> " + new BigDecimal("100.0001").setScale(3, RoundingMode.UP));
        System.out.println("DOWN >> " + new BigDecimal("100.0001").setScale(3, RoundingMode.DOWN));
        System.out.println("CEILING >> " + new BigDecimal("100.0001").setScale(3, RoundingMode.CEILING));
        System.out.println("FLOOR >> " + new BigDecimal("100.0001").setScale(3, RoundingMode.FLOOR));
        System.out.println("HALF_UP >> " + new BigDecimal("100.0001").setScale(3, RoundingMode.HALF_UP));
        System.out.println("HALF_DOWN >> " + new BigDecimal("100.0001").setScale(3, RoundingMode.HALF_DOWN));
        System.out.println("HALF_EVEN >> " + new BigDecimal("100.0001").setScale(3, RoundingMode.HALF_EVEN));
    }
}
